<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册</title>
    <link href="__STATIC__/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/static/admin/css/animate.min.css" rel="stylesheet">
    <link href="/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/admin/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="/static/admin/css/plugins/switchery/switchery.css" rel="stylesheet">
    <link href="/static/admin/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="/static/admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/static/admin/js/content.min.js?v=1.0.0"></script>
    <script src="/static/admin/js/plugins/chosen/chosen.jquery.js"></script>
    <script src="/static/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script src="/static/admin/js/plugins/layer/laydate/laydate.js"></script>
    <script src="/static/admin/js/plugins/switchery/switchery.js"></script><!--IOS开关样式-->
    <script src="/static/admin/js/jquery.form.js"></script>
    <script src="/static/admin/js/layer/layer.js"></script>
    <script src="/static/admin/js/laypage/laypage.js"></script>
    <script src="/static/admin/js/laytpl/laytpl.js"></script>
    <script src="/static/admin/js/lunhui.js"></script>
    <style>
        .gray-bg{font-family: "Microsoft Yahei"}
        .text{width:100%;height:45px;border:1px #ccc solid;border-radius: 5px;}
        .text1{width:100%;height:45px;border:1px #ccc solid;border-radius: 5px;text-align:center;}
        .p1{font-size:16px;height:18px;color:#000;margin-top:10px;}
        .s1{font-size:16px;color:red;}
        .p2{font-size:18px;height:47px;color:#000; margin:0;}
        .p3{font-size:13px;height:15px;line-hegiht:15px;color:#ccc;padding-left: 3px;}
        .button{font-size:18px;color:#000;width:100%;height:40px;line-height:40px;text-align: center;border-radius: 5px; margin: 0 auto;border:1px #576890 solid;margin-top:50px;}
    </style>

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content bg">
    <div class="row">

        {if condition="$role==1||$role==2"}
        <div class="col-sm-12"  >
            <p class="p4">学籍号：{$info.studentCode}</p>
            <p class="p4">学生姓名：{$info.studentName}</p>
            <p class="p4">联系电话：{$info.mobile}</p>
            <p class="p4">性别：  {if condition="$info.sex eq 0"}男{else}女{/if} </p>
            <p class="p4">学校：{$instit_name}</p>
            <p class="p4">入学年份：{$info.jionyear}</p>
        </div>
        {/if}

        {if condition="$role eq 3"}
        <div class="col-sm-12"  >
            <p class="p4">学生姓名：{$info.name}</p>
            <p class="p4">联系电话：{$info.mobile}</p>
            <p class="p4">性别：  {if condition="$info.sex eq 0"}男{else}女{/if} </p>
            <p class="p4">学校：{$instit_name}</p>
        </div>
        {/if}

        {if condition="$role eq 4"}
        <div class="col-sm-12"  >
            <p class="p4">姓名：{$user.nickname}</p>
            <p class="p4">电话：{$user.account}</p>
            <!--<p class="p4">性别：  {if condition="$info.sex eq 0"}男{else}女{/if} </p>-->
            <!--<p class="p4">学校：{$instit_name}</p>-->
        </div>
        {/if}



    <form class="form-horizontal m-t" name="add" id="add" method="post" action="save_pwd">
            <div class="col-sm-12" id="sj"  >
                <p class="p1"><span class="s1">*</span><span >登录密码</span></p>
                <p class="p2"><input class="text" type="password" name="password" id="password" value=""></p>
            </div>

            <div class="col-sm-12" >
                <input class="text" type="hidden" name="user_id" id="user_id" value="{$user.id}">
                <a href="javascript:;" onclick="save_pwd();"><div class="button">确认</div></a>
            </div>

    </form>
</div>
</div>

<script type="text/javascript">


    function save_pwd(){

        var password =  document.getElementById('password').value;
        var user_id =  document.getElementById('user_id').value;

        if( '' == password){
            layer.msg('请填写密码', {icon: 5}, function(index){
                layer.close(index);
            });
            return false;
        }


        $.post('{:url("save_pwd2")}',
                {password:password,user_id:user_id},
                function(data){
                    if(data.code==1){
                        layer.msg(data.msg,{icon:1,time:2000,shade: 0.1,});
                        location.href ="./login.html";
                    }else{
                        layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        return false;
                    }
                });
        return false;
    }
</script>




</body>
</html>